﻿<%@ Page Title="Upload Manager | Hardwares-R-Us" Language="C#" MasterPageFile="~/Main.Master"
    Theme="Admin_User_Theme" AutoEventWireup="true" CodeBehind="UploadManager.aspx.cs"
    Inherits="WDTAsg2.Admin.UploadManager" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1>
        Upload Manager</h1>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:ListView ID="lvDownloads" runat="server" OnItemCommand="lvDownloads_ItemCommand">
                <LayoutTemplate>
                    <table clientidmode="Static" runat="server" id="tblUploads">
                        <tr id="Tr1" runat="server">
                            <th id="Th1" runat="server">
                                Title
                            </th>
                            <th id="Th2" runat="server">
                                Description
                            </th>
                            <th id="Th3" runat="server">
                                URL
                            </th>
                            <th id="Th4" runat="server">
                                Uploader
                            </th>
                            <th id="Th5" runat="server">
                                Approved
                            </th>
                            <th colspan="2" id="Th6" runat="server">
                                Action
                            </th>
                        </tr>
                        <tr runat="server" id="itemPlaceholder" />
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr runat="server">
                        <td>
                            <asp:Label ID="DownloadIdLabel" runat="server" Visible="false" Text='<%# Eval("DownloadId") %>' />
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("Title") %>' />
                        </td>
                        <td>
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("Description") %>' />
                        </td>
                        <td>
                            <asp:Label ID="DownloadUrlLabel" runat="server" Text='<%# Eval("DownloadUrl") %>' />
                        </td>
                        <td>
                            <asp:Label ID="UploaderLabel" runat="server" Text='<%# Eval("Uploader") %>' />
                        </td>
                        <td>
                            <asp:Label ID="ApprovedLabel" runat="server" Text='<%# Eval("Approved") %>' />
                        </td>
                        <td>
                            <asp:LinkButton ID="ApproveButton" runat="server" CommandName="Approve" Text="Approve" />
                        </td>
                        <td>
                            <asp:LinkButton ID="DisapproveButton" runat="server" CommandName="Disapprove" Text="Disapprove" />
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <br />
</asp:Content>
